package com.kzw.oa.model.system;

import java.io.Serializable;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

public class SystemLog implements Serializable {

	protected Long logId;
	protected String username;
	protected Long userId;
	protected java.util.Date createtime;
	protected String exeOperation;
	// 版块
	private String board;
	// 级别
	private int level = 0;

	public static final int INFO = 0;
	public static final int ERROR = 1;

	/**
	 * Default Empty Constructor for class SystemLog
	 */
	public SystemLog() {
		super();
	}

	/**
	 * Default Key Fields Constructor for class SystemLog
	 */
	public SystemLog(Long in_logId) {
		this.setLogId(in_logId);
	}

	/**
	 * *
	 * 
	 * @return Long
	 * @hibernate.id column="logId" type="java.lang.Long"
	 *               generator-class="native"
	 */
	public Long getLogId() {
		return this.logId;
	}

	/**
	 * Set the logId
	 */
	public void setLogId(Long aValue) {
		this.logId = aValue;
	}

	/**
	 * 用户名 *
	 * 
	 * @return String
	 * @hibernate.property column="username" type="java.lang.String"
	 *                     length="128" not-null="true" unique="false"
	 */
	public String getUsername() {
		return this.username;
	}

	/**
	 * Set the username
	 * 
	 * @spring.validator type="required"
	 */
	public void setUsername(String aValue) {
		this.username = aValue;
	}

	/**
	 * 用户ID *
	 * 
	 * @return Long
	 * @hibernate.property column="userId" type="java.lang.Long" length="19"
	 *                     not-null="true" unique="false"
	 */
	public Long getUserId() {
		return this.userId;
	}

	/**
	 * Set the userId
	 * 
	 * @spring.validator type="required"
	 */
	public void setUserId(Long aValue) {
		this.userId = aValue;
	}

	/**
	 * 执行时间 *
	 * 
	 * @return java.util.Date
	 * @hibernate.property column="createtime" type="java.util.Date" length="19"
	 *                     not-null="true" unique="false"
	 */
	public java.util.Date getCreatetime() {
		return this.createtime;
	}

	/**
	 * Set the createtime
	 * 
	 * @spring.validator type="required"
	 */
	public void setCreatetime(java.util.Date aValue) {
		this.createtime = aValue;
	}

	/**
	 * 执行操作 *
	 * 
	 * @return String
	 * @hibernate.property column="exeOperation" type="java.lang.String"
	 *                     length="512" not-null="true" unique="false"
	 */
	public String getExeOperation() {
		return this.exeOperation;
	}

	/**
	 * Set the exeOperation
	 * 
	 * @spring.validator type="required"
	 */
	public void setExeOperation(String aValue) {
		this.exeOperation = aValue;
	}

	/**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		if (!(object instanceof SystemLog)) {
			return false;
		}
		SystemLog rhs = (SystemLog) object;
		return new EqualsBuilder().append(this.logId, rhs.logId).append(
				this.username, rhs.username).append(this.userId, rhs.userId)
				.append(this.createtime, rhs.createtime).append(
						this.exeOperation, rhs.exeOperation).isEquals();
	}

	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return new HashCodeBuilder(-82280557, -700257973).append(this.logId)
				.append(this.username).append(this.userId).append(
						this.createtime).append(this.exeOperation).toHashCode();
	}

	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this).append("logId", this.logId).append(
				"username", this.username).append("userId", this.userId)
				.append("createtime", this.createtime).append("exeOperation",
						this.exeOperation).toString();
	}

	public String getBoard() {
		return board;
	}

	public void setBoard(String board) {
		this.board = board;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

}
